﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Examination.Model
{
    public enum ScoreType
    {
        Avg = 0,
        Max = 1,
        Min = 2
    }

    public class Examination : Entity
    {
        [Required]
        public long CreatorId { get; set; }

        [Required]
        [MaxLength(100)]
        public string Title { get; set; }

        public int RadioCount { get; set; } = 5;

        public int RadioScore { get; set; } = 5;

        public int MultipleCount { get; set; } = 5;

        public int MultipleScore { get; set; } = 5;

        public int JudgeCount { get; set; } = 5;

        public int JudgeScore { get; set; } = 5;

        public int FillCount { get; set; } = 5;

        public int FillScore { get; set; } = 5;

        public DateTime StartTime { get; set; }

        public DateTime EndTime { get; set; }

        public int Time { get; set; } = 3600;

        public bool RandomQuestions { get; set; } = true;

        public bool RandomOptions { get; set; } = true;

        public int Times { get; set; } = 1;

        public ScoreType Type { get; set; } = ScoreType.Max;
    }
}
